package com.example.demo.controller;

import com.example.api.TestRemoteService;
import com.example.common.util.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class HelloController {

    private final TestRemoteService testRemoteService;

    @GetMapping("/hello")
    public R hello() {
        return R.ok("success");
    }

    @GetMapping("/test")
    public R test(){
        return R.ok(testRemoteService.test());
    }
}
